/// breaks referential transparency
export function unsafe-is:[T]
    &(T,T) => Bool
    native '__GeneralEqual';

type Ordering enum {
    type <<;
    type ==;
    type >>;
};
export function = : &(Ordering,Ordering) => Bool  native '__EnumIndexEqual';

type Op=
    [in T]
    &(T,T) => Bool;

type Op<
    [in T]
    &(T,T) => Bool;

type Op<>
    [in T]
    &(T,T) => Ordering;

export function !=:
    [T] { = : Op=[T] }
    &(T,T) => Bool
    &(a,b) => { not { = (a, b) } };

export function >:
    [T] { < : Op<[T] }
    &(T,T) => Bool
    &(a,b) => { < (b, a) };

export function <=:
    [T] { < : Op<[T] }
    &(T,T) => Bool
    &(a,b) => { not { < (b, a) } };

export function >=:
    [T] { < : Op<[T] }
    &(T,T) => Bool
    &(a,b) => { not { < (a, b) } };

export function min:
    [T] { < : Op<[T] }
    &(T,T) => T
    &(a,b) => (if { < (a, b) }: a, else: b);

export function max:
    [T] { < : Op<[T] }
    &(T,T) => T
    &(a,b) => (if { < (b, a) }: a, else: b);


